#include "testlib.h"
#include <bits/stdc++.h>

using namespace std;

void test() {
    int N = opt<int>("n");
    string type = opt<string>("type");
    
    cout << N << endl;
    if (type == "sample1") {
        cout << "3 2 5 2 2" << endl;
    } else if (type == "sample2") {
        cout << "1 1 1" << endl;
    } else if (type == "max") {
        // 最大数据，所有元素都相同
        for (int i = 0; i < N; i++) {
            cout << "1 ";
        }
        cout << endl;
    } else if (type == "max_diff") {
        // 最大数据，所有元素都不同
        for (int i = 0; i < N; i++) {
            cout << (i + 1) << " ";
        }
        cout << endl;
    } else if (type == "half") {
        // 一半相同，一半不同
        for (int i = 0; i < N/2; i++) {
            cout << "1 ";
        }
        for (int i = N/2; i < N; i++) {
            cout << (i - N/2 + 2) << " ";
        }
        cout << endl;
    } else {
        // 随机生成
        for (int i = 0; i < N; i++) {
            cout << rnd.next(1, min(N, 100000)) << " ";
        }
        cout << endl;
    }
}

int main(int argc, char* argv[]) {
    registerGen(argc, argv, 1);
    test();
    return 0;
}